# SConscript for tests subdirectory

# Import envrionment
Import('env')

pretty_printing=ARGUMENTS.get('pretty',1)

test_env = Environment()
base_flags = str(env['CCFLAGS'])
base_flags = base_flags.replace("-Wall", "")
test_env.Append(CCFLAGS = base_flags)
test_env.Append(CCFLAGS = "-Wno-undef")
test_env['CC'] = env['CC']
test_env['CPPPATH'] = env['CPPPATH']

if int(pretty_printing):
    test_env['CCCOMSTR'] = env['CCCOMSTR']
    test_env['CXXCOMSTR'] = env['CXXCOMSTR']

# Now get list of .cpp files
src_files = Glob('*.cpp')
src_files.remove(File('atomcore-test.cpp'))

atomcore_o = test_env.Object('atomcore-test.cpp')
env.Depends(atomcore_o, '../core/atom-core/atomcore.cpp')

objs = test_env.Object(src_files)

ret_objs = objs + [atomcore_o]
Return('ret_objs')
